package STO_28;

import LCommon.TreeNode;

public class Solution {
	public boolean isSymmetric(TreeNode root) {
		return root==null?true:recur(root.left,root.right);
	}

	private boolean recur(TreeNode left, TreeNode right) {
		if (left==null && right == null) {
			return true;
		}
		
		
		if (left==null ||right==null || left.val!=right.val) {
			return false;
		}
		
		
		return recur(left.left, right.right)&&recur(left.right, right.left);
		
	}
}
